Skip to content

use current language if Language is not passed#167

Merged
jensens merged 10 commits into
bluedynamics:mainfrom
erral:erral-fix-language-code
Jun 29, 2026
Merged

use current language if Language is not passed#167
jensens merged 10 commits into
bluedynamics:mainfrom
erral:erral-fix-language-code

Conversation

@erral

@erral erral commented May 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #166

I introduce here a dependency on plone.api, but we can remove it and use the implementation that plone.api uses to get the current language.

@jensens

jensens commented Jun 15, 2026

Copy link
Copy Markdown
Member

late here, sorry, but indeed I would avoid an dependency indirection to plone.api here.

@erral

erral commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

I have removed the dependency and copied the code in plone.api to get the current language

erral and others added 6 commits June 16, 2026 12:00
…dynamics#166)

Adds regression tests for erral's fix: when a query has no Language,
_handle_text falls back to get_current_language() (request/site/default),
and an explicit Language still wins. Plus unit tests for the vendored
get_current_language helper.

Co-authored-by: Mikel Larreategi <erral@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jensens
jensens merged commit 9e85b92 into bluedynamics:main Jun 29, 2026
5 checks passed
@erral
erral deleted the erral-fix-language-code branch June 29, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Current language is not taken into account in multilingual sites to use the BM25 ranking

2 participants